<?php

DEFINE("HOME_PATH", "../");

require_once(HOME_PATH.'class/class.Entity.php');
require_once(HOME_PATH.'class/class.Topic.php');
require_once(HOME_PATH.'class/class.Message.php');
require_once(HOME_PATH.'class/class.Utilities.php');



if (isset($_POST['action']) && $_POST['action'] == "post") {
	
	$messageVO = new MessageVO($_POST);
	$message = new Message($messageVO);
	$message->fillVO();
	
	// TODO	continue adding logic here - save message into DB
	echo json_encode($message->getVO());
}